const Service = require('../../../core/service/ApiService');

class AnsService extends Service{

    async insertInfo(info){
        // console.log(info);
        // console.log(info.start_time);
        // console.log(info.end_time);
        var start = new Date(info.start_time);
        var end = new Date(info.end_time);
        // console.log(start);
        // console.log(end);
        var total_time = (end-start)/1000;
        console.log(total_time);
        // var t = info.end_time-info.start_time;
        info.total_time = total_time;
        await this.model.InfoAns.create(info);
    }
}

module.exports = AnsService;
